package com.jy.api.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created by lihu on 2018/1/4.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {

    private int code;

    private String msg;

    private Object data;


    public Result(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(int code) {
        this.code = code;
    }

    public Result OK(Object data) {
        code = 200;
        msg = "";
        this.data = data;
        return this;
    }
}
